home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 140
/
(Vol 140) Sep 19 2011.iso
/
Games
/
axterix.swf
/
scripts
/
DefineSprite_590
/
frame_1
/
DoAction.as
Wrap
Text File
|
2011-09-19
|
3KB
|
116 lines
function descend(nbsauts)
{
if(firstvisible != 0)
{
i = 1;
while(NbElements >= i)
{
eval("Case_" + i)._y += eval("Case_" + i)._height * nbsauts;
eval("CaseText_" + i)._y += eval("CaseText_" + i)._height * nbsauts;
i++;
}
i = 1;
while(nbsauts >= i)
{
tmp = firstvisible;
eval("Case_" + tmp)._visible = true;
eval("CaseText_" + tmp)._visible = true;
tmp = firstvisible + nbvisibles;
eval("Case_" + tmp)._visible = false;
eval("CaseText_" + tmp)._visible = false;
firstvisible--;
i++;
}
}
}
function monte(nbsauts)
{
if(firstvisible + nbvisibles < NbElements)
{
i = 1;
while(NbElements >= i)
{
eval("Case_" + i)._y -= eval("Case_" + i)._height * nbsauts;
eval("CaseText_" + i)._y -= eval("CaseText_" + i)._height * nbsauts;
i++;
}
i = 1;
while(nbsauts >= i)
{
tmp = firstvisible + 1;
eval("Case_" + tmp)._visible = false;
eval("CaseText_" + tmp)._visible = false;
tmp = firstvisible + nbvisibles + 1;
eval("Case_" + tmp)._visible = true;
eval("CaseText_" + tmp)._visible = true;
firstvisible++;
i++;
}
}
}
function rafraichir()
{
i = 1;
while(NbElements >= i)
{
removeMovieClip(eval("Case_" + i));
removeMovieClip(eval("CaseText_" + i));
i++;
}
i = 1;
while(NbElements >= i)
{
This.attachMovie("Id_CaseText","CaseText_" + i,i);
eval("CaseText_" + i)._y += i * eval("CaseText_" + i)._height;
eval("CaseText_" + i).Texte = Liste[i - 1];
eval("CaseText_" + i)._visible = false;
duplicateMovieClip(Case_0,"Case_" + i,16384 + (- i));
eval("Case_" + i)._y = eval("Case_" + i)._height * i;
eval("Case_" + i)._visible = false;
i++;
}
}
function remove()
{
NbElements--;
this.rafraichir();
}
function removeAt(index)
{
i = index;
while(i < NbElements)
{
Liste[i] = Liste[i + 1];
i++;
}
NbElements--;
this.rafraichir();
}
function addItem(Nom)
{
NbElements++;
Liste[NbElements - 1] = Nom;
this.rafraichir();
}
function getSelection()
{
return SelectionText_0.Texte;
}
Case_0._visible = false;
Clicked = false;
This.attachMovie("Id_SelectionText","SelectionText_0",0);
i = 1;
while(NbElements >= i)
{
This.attachMovie("Id_CaseText","CaseText_" + i,i);
eval("CaseText_" + i)._y += i * eval("CaseText_" + i)._height;
eval("CaseText_" + i).Texte = Liste[i - 1];
eval("CaseText_" + i)._visible = false;
duplicateMovieClip(Case_0,"Case_" + i,16384 + (- i));
eval("Case_" + i)._y = eval("Case_" + i)._height * i;
eval("Case_" + i)._visible = false;
i++;
}
firstvisible = 0;
stop();